package com.gqj.meter.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gqj.common.annotation.Excel;
import com.gqj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.poi.ss.usermodel.IndexedColors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 出入库明细对象 md_in_task_details
 *
 * @author lxq
 * @date lxq-02-10
 */
public class MdInTaskDetails extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long inTaskDetailsId;

    /**
     * 入库任务编号
     */
    @ApiModelProperty("任务编号")
    @Excel(name = "任务编号", width = 30, type = Excel.Type.EXPORT, sort = 1)
    private String inTaskNo;

    /**
     * 设备ID
     */
    private Long assetsId;

    /**
     * rfid编号/条形码
     */
    @ApiModelProperty("条形码")
    @NotBlank(message = "条形码不能为空")
    @Excel(name = "条形码", width = 30, sort = 3, headerBackgroundColor = IndexedColors.RED1)
    private String rfidNo;

    /**
     * 设备码
     */
    @Excel(name = "设备码", width = 30, sort = 4)
    @ApiModelProperty(name = "设备码")
    private String equipCode;

    /**
     * 设备名称
     */
    @Excel(name = "设备名称", width = 30, sort = 5)
    @ApiModelProperty(name = "设备名称")
    private String equipName;


    /**
     * 出厂编号
     */
    @Excel(name = "出厂编号", width = 30, sort = 6)
    @ApiModelProperty("出厂编号")
    private String madeNo;

    /**
     * 类别
     */
    @Excel(name = "类别", width = 20, sort = 10)
    @ApiModelProperty("类别")
    private String sortCode;

    /**
     * 类型
     */
    @Excel(name = "类型", width = 20, sort = 11)
    @ApiModelProperty("类型")
    private String typeCode;

    /**
     * 资产大类：
     * 01：电能表
     * 02：互感器
     * 03：采集终端
     * 04：采集器
     * 05：通讯模块
     * 10：其他
     */
    @Excel(name = "资产大类", width = 20, type = Excel.Type.EXPORT, sort = 5, dictType = "md_assets_category")
    @ApiModelProperty("资产大类")
    private String assetsCategory;

    /**
     * 库房标识
     */
    private Long whId;

    /**
     * 库区标识
     */
    private Long whAreaId;

    private String whNo;

    /**
     * 库房名称
     */
    @ApiModelProperty("库房")
    private String whName;

    /**
     * 库区编号，库区的用户自编号
     */
    private String whAreaNo;

    /**
     * 库区名称
     */
    @ApiModelProperty("库区")
    private String whAreaName;

    /**
     * 存放区标识
     */
    private Long storeAreaId;

    /**
     * 存放区编号，存放区的用户自编号
     */
    private String storeAreaNo;

    /**
     * 存放区名称
     */
    @ApiModelProperty("存放区")
    private String storeAreaName;

    /**
     * 储位标识
     */
    private Long storeLocId;

    /**
     * 储位编号
     */
    @ApiModelProperty("储位编号")
    private String storeLocNo;

    /**
     * 储位名称
     */
    @ApiModelProperty("储位名称")
    private String storeLocName;

    /**
     * 入库状态
     */
    private String statusCode;

    /**
     * 是否完成，0-未完成，1-已完成
     */
    @Excel(name = "是否完成", width = 20, type = Excel.Type.EXPORT, sort = 19, dictType = "md_is_complete")
    @ApiModelProperty("是否完成")
    private String isComplete;

    /**
     * 入库原因04：配送入库
     * 10：配送出库
     * 11：新装/更换出库
     * 12：预领出库
     * 05：预领退回入库
     * 06：领出未装入库
     */
    private String inWhSortCode;

    /**
     * 操作人名称
     */
    @Excel(name = "操作人名称", width = 20, type = Excel.Type.EXPORT, sort = 13)
    private String nickName;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT, sort = 14)
    @ApiModelProperty("操作时间")
    private Date operationDate;

    /**
     * 发送人
     */
    private String sender;

    /**
     * 接收人
     */
    private String receiver;

    /**
     * 原部门
     */
    private String originalDept;

    /**
     * 目标部门
     */
    private String targetDept;


    //是否正常
    private String isNormal;

    /*
     * 操作标识
     * */
    private Long operId;

    /**
     * 设备标识
     */

    private Long equipId;

    public Long getEquipId() {
        return equipId;
    }

    public void setEquipId(Long equipId) {
        this.equipId = equipId;
    }

    public Long getOperId() {
        return operId;
    }

    public void setOperId(Long operId) {
        this.operId = operId;
    }

    public String getIsNormal() {
        return isNormal;
    }

    public void setIsNormal(String isNormal) {
        this.isNormal = isNormal;
    }

    /**
     * 使用设备
     */
    @ApiModelProperty("使用设备")
    private String useEquipment;

    public String getUseEquipment() {
        return useEquipment;
    }

    public void setUseEquipment(String useEquipment) {
        this.useEquipment = useEquipment;
    }

    public String getAssetsCategory() {
        return assetsCategory;
    }

    public void setAssetsCategory(String assetsCategory) {
        this.assetsCategory = assetsCategory;
    }

    public String getStoreLocName() {
        return storeLocName;
    }

    public void setStoreLocName(String storeLocName) {
        this.storeLocName = storeLocName;
    }

    //重复数量
    private int repeatNumber;

    public int getRepeatNumber() {
        return repeatNumber;
    }

    public void setRepeatNumber(int repeatNumber) {
        this.repeatNumber = repeatNumber;
    }

    public void setInTaskDetailsId(Long inTaskDetailsId) {
        this.inTaskDetailsId = inTaskDetailsId;
    }

    public Long getInTaskDetailsId() {
        return inTaskDetailsId;
    }

    public void setInTaskNo(String inTaskNo) {
        this.inTaskNo = inTaskNo;
    }

    public String getInTaskNo() {
        return inTaskNo;
    }

    public void setAssetsId(Long assetsId) {
        this.assetsId = assetsId;
    }

    public Long getAssetsId() {
        return assetsId;
    }

    public void setRfidNo(String rfidNo) {
        this.rfidNo = rfidNo;
    }

    public String getRfidNo() {
        return rfidNo;
    }

    public void setMadeNo(String madeNo) {
        this.madeNo = madeNo;
    }

    public String getMadeNo() {
        return madeNo;
    }

    public void setSortCode(String sortCode) {
        this.sortCode = sortCode;
    }

    public String getSortCode() {
        return sortCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setWhId(Long whId) {
        this.whId = whId;
    }

    public Long getWhId() {
        return whId;
    }

    public void setWhAreaId(Long whAreaId) {
        this.whAreaId = whAreaId;
    }

    public Long getWhAreaId() {
        return whAreaId;
    }

    public void setStoreAreaId(Long storeAreaId) {
        this.storeAreaId = storeAreaId;
    }

    public Long getStoreAreaId() {
        return storeAreaId;
    }

    public void setStoreLocId(Long storeLocId) {
        this.storeLocId = storeLocId;
    }

    public Long getStoreLocId() {
        return storeLocId;
    }

    public void setIsComplete(String isComplete) {
        this.isComplete = isComplete;
    }

    public String getIsComplete() {
        return isComplete;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getWhNo() {
        return whNo;
    }

    public void setWhNo(String whNo) {
        this.whNo = whNo;
    }

    public String getWhName() {
        return whName;
    }

    public void setWhName(String whName) {
        this.whName = whName;
    }

    public String getWhAreaNo() {
        return whAreaNo;
    }

    public void setWhAreaNo(String whAreaNo) {
        this.whAreaNo = whAreaNo;
    }

    public String getWhAreaName() {
        return whAreaName;
    }

    public void setWhAreaName(String whAreaName) {
        this.whAreaName = whAreaName;
    }

    public String getStoreAreaNo() {
        return storeAreaNo;
    }

    public void setStoreAreaNo(String storeAreaNo) {
        this.storeAreaNo = storeAreaNo;
    }

    public String getStoreAreaName() {
        return storeAreaName;
    }

    public void setStoreAreaName(String storeAreaName) {
        this.storeAreaName = storeAreaName;
    }

    public String getStoreLocNo() {
        return storeLocNo;
    }

    public void setStoreLocNo(String storeLocNo) {
        this.storeLocNo = storeLocNo;
    }

    public String getInWhSortCode() {
        return inWhSortCode;
    }

    public void setInWhSortCode(String inWhSortCode) {
        this.inWhSortCode = inWhSortCode;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Date getOperationDate() {
        return operationDate;
    }

    public void setOperationDate(Date operationDate) {
        this.operationDate = operationDate;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getOriginalDept() {
        return originalDept;
    }

    public void setOriginalDept(String originalDept) {
        this.originalDept = originalDept;
    }

    public String getTargetDept() {
        return targetDept;
    }

    public void setTargetDept(String targetDept) {
        this.targetDept = targetDept;
    }

    public String getEquipCode() {
        return equipCode;
    }

    public void setEquipCode(String equipCode) {
        this.equipCode = equipCode;
    }

    public String getEquipName() {
        return equipName;
    }

    public void setEquipName(String equipName) {
        this.equipName = equipName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("inTaskDetailsId", getInTaskDetailsId())
                .append("inTaskNo", getInTaskNo())
                .append("assetsId", getAssetsId())
                .append("rfidNo", getRfidNo())
                .append("madeNo", getMadeNo())
                .append("sortCode", getSortCode())
                .append("typeCode", getTypeCode())
                .append("whId", getWhId())
                .append("whAreaId", getWhAreaId())
                .append("storeAreaId", getStoreAreaId())
                .append("storeLocId", getStoreLocId())
                .append("isComplete", getIsComplete())
                .toString();
    }
}
